package com.chaosj.skill.guava.basic

import com.google.common.base.Strings

/**
 * @Description:
 * @author: caoyangjie
 * @date: 2019年11月2019/11/26日 17:52
 * @Copyright: © 赢时胜
 */
class GuavaStrings {
    static void main(args){
        println(Strings.nullToEmpty(null))
        println(Strings.emptyToNull(""))
        println(Strings.padStart("7",3,"*".toCharacter()))
        println(Strings.padEnd("7",3,"*".toCharacter()))
        println(Strings.padStart(Strings.padEnd("7",3,"*".toCharacter()),5,"*".toCharacter()))
        println(Strings.repeat("hello",3))
        println(Strings.lenientFormat("%s:%s:%s:%s","wo","say","hello"))
    }
}
